import request from "@/utils/request"

// 邀请加入团队页面的接口
export function joinTeam(data) {
  return request({
    url: '/api/team/account/register',
    method: 'post',
    data
  })
}

// 获取账户信息
export function getUserInfo (params) {
  return request({
    url: '/api/team/account/info',
    method: 'get',
    params
  })
}

// 排行榜列表
export function getRankList (params) {
  return request({
    url: '/api/team/account/rankListByLoginId',
    method: 'get',
    params
  })
}

// 更换手机号
export function updateMobile (data) {
  return request({
    url: '/api/team/account/updateMobile',
    method: 'post',
    data
  })
}

// 发送验证码
export function sendCode (data) {
  return request({
    url: '/api/team/account/sendCode',
    method: 'post',
    data
  })
}

// 更新用户状态
// WAIT_AUDIT(1),//待审核
// AUDIT_PASS(2),//审核通过
// AUDIT_NOT_PASS(3),//审核未通过
// FREEZE(4),//冻结
// DELETED(5)//已删除
export function updateUserStatus (data) {
  return request({
    url: '/api/team/account/updateStatus',
    method: 'post',
    data
  })
}

// 查看所有成员列表 
export function listMembers (data) {
  return request({
    url: '/api/team/hq/listMembers',
    method: 'post',
    data
  })
}

// 查看所有商户列表
export function listMerchant (params) {
  return request({
    url: '/api/team/hq/listMerchant',
    method: 'get',
    params
  })
}

// 查询所有分组
export function listGroup () {
  return request({
    url: '/api/team/hq/listGroup',
    method: 'get'
  })
}

// 查询待审核商户列表
export function listWaitAuthMerchant () {
  return request({
    url: '/api/team/hq/listWaitAuthMerchant',
    method: 'get'
  })
}

// 账号常用设置-查询拍摄参与度
export function findFilmingParticipation () {
  return request({
    url: '/api/team/preference/findPreference',
    method: 'get'
  })
}

// 账号常用设置-查询个性化设置
export function findPersonParam () {
  return request({
    url: '/api/team/preference/findPersonParam',
    method: 'get'
  })
}

// 更新个性化参数
export function updatePersonParam (data) {
  return request({
    url: '/api/team/preference/updatePersonParam',
    method: 'post',
    data
  })
}

// 查询颜色列表
export function listPreferenceColor () {
  return request({
    url: '/api/team/preference/listPreferenceColor',
    method: 'get'
  })
}

// 查询字体列表
export function listPreferenceFont () {
  return request({
    url: '/api/team/preference/listPreferenceFont',
    method: 'get'
  })
}

// 查询声音列表
export function listPreferenceVoice () {
  return request({
    url: '/api/team/preference/listPreferenceVoice',
    method: 'get'
  })
}

// 查询所有素材包
export function listAllPackage () {
  return request({
    url: '/api/team/material/listAllPackage',
    method: 'get'
  })
}

// 按主题查询素材包
export function listPackageByTopic (params) {
  return request({
    url: '/api/team/material/listPackageByTopic',
    method: 'get',
    params
  })
}

// 查询素材包详情
export function listMaterialContent (params) {
  return request({
    url: '/api/team/material/listMaterialContent',
    method: 'get',
    params
  })
}

// 查询托管状态
export function findPublishAuto () {
  return request({
    url: '/api/team/preference/findPublishAuto',
    method: 'get',
  })
}

// 托管发布更新
export function updatePublishAuto (data) {
  return request({
    url: '/api/team/preference/updatePublishAuto',
    method: 'post',
    data
  })
}

// 查询授权信息
export function listBindingPlatform () {
  return request({
    url: '/api/team/account/listBindingPlatform',
    method: 'get',
  })
}

// 更新拍摄参与度
export function updateFilmingParticipation (data) {
  return request({
    url: '/api/team/preference/updateFilmingParticipation',
    method: 'post',
    data
  })
}

// 修改授权方式
export function updateMaterialType (data) {
  return request({
    url: '/api/team/material/updateMaterialType',
    method: 'post',
    data
  })
}

// 邀请新商户
export function inviteMerchant () {
  return request({
    url: '/api/team/hq/getInviteUrl',
    method: 'get',
  })
}

// 获取商户的邀请地址
export function inviteMember () {
  return request({
    url: '/api/team/hq/getMerchantInviteUrl',
    method: 'get',
  })
}

// 审核并授权
export function authPass (data) {
  return request({
    url: '/api/team/account/authPass',
    method: 'post',
    data
  })
}

// 获取H5-token
export function checkBrainLogin (data) {
  return request({
    url: '/api/team/account/checkBrainLogin',
    method: 'post',
    data
  })
}

// 查询用户已授权素材包
export function listPackageByAccountId (params) {
  return request({
    url: '/api/team/material/listPackageByAccountId',
    method: 'get',
    params
  })
}

// 删除单个素材包授权
export function deletePackageAuth (params) {
  return request({
    url: '/api/team/material/deletePackageAuth',
    method: 'get',
    params
  })
}

// 更改用户名称
export function updateUsername (data) {
  return request({
    url: '/api/team/account/updateUsername',
    method: 'post',
    data
  })
}

// 更改用户头像 http://yapi.shijiayun.cn/project/88/interface/api/3990
export function updateHeadImage (data) {
  return request({
    url: '/api/team/account/updateHeadImage',
    method: 'post',
    data
  })
}

// 查询已发布视频
export function listPublishRecord (data) {
  return request({
    url: '/api/team/publish/listPublishVideo',
    method: 'post',
    data
  })
}

// 统计本月的视频播放量
export function countMonthView () {
  return request({
    url: '/api/team/publish/countMonthView',
    method: 'get',
  })
}

// 评价视频
export function doComment (data) {
  return request({
    url: '/api/team/comment/doComment',
    method: 'post',
    data
  })
}

// 根据用户token获取用户信息 
export function getLoginAccount () {
  return request({
    url: '/api/team/account/getLoginAccount',
    method: 'get',
  })
}

// 条次管理-条次统计
export function getStripCount () {
  return request({
    url: '/api/customer/strip/getStripCount',
    method: 'get',
  })
}

// 条次管理-充值、消耗列表
export function listUsedAndRecharge () {
  return request({
    url: '/api/customer/strip/listUsedAndRecharge',
    method: 'get',
  })
}

// 获取充值二维码
export function getPayUrl (data) {
  return request({
    url: '/api/wxpay/native',
    method: 'post',
    data
  })
}

// 查询支付方式
export function getPayType () {
  return request({
    url: '/api/customer/pay/getPayType',
    method: 'get',
  })
}

// 查询支付设置
export function getOnlinePaySetting () {
  return request({
    url: '/api/customer/pay/getOnlinePaySetting',
    method: 'get',
  })
}

// 查询支付结果
export function getPayStatus (params) {
  return request({
    url: '/api/wxpay/getPayStatus',
    method: 'get', params
  })
}

// 查询拍摄参与度设置
export function listCategory () {
  return request({
    url: '/api/team/preference/listCategory',
    method: 'get'
  })
}

// 账号常用设置-保存参与拍摄
export function savefilmingParticipation (data) {
  return request({
    url: '/api/team/preference/saveItem',
    method: 'post',
    data
  })
}

// 获取待审核的成员
export function getWaitAuthMember () {
  return request({
    url: '/api/team/hq/listWaitAuthMember',
    method: 'get',
  })
}

// 行业下的品类列表
export function getListCategory () {
  return request({
    url: '/api/team/preference/listCategory',
    method: 'get',
  })
}

// 品类下的品项列表
export function getItemList (params) {
  return request({
    url: '/api/team/preference/itemList',
    method: 'get', params
  })
}

// 注册页是否有活动
export function hasActivities (params) {
  return request({
    url: '/api/customer/activities/hasActivities',
    method: 'get', params
  })
}

// 查询话题词
export function listTopicWords (params) {
  return request({
    url: '/api/team/preference/listTopicWords',
    method: 'get', params
  })
}

// 添加话题词
export function addTopicWords (params) {
  return request({
    url: '/api/team/preference/addTopicWords',
    method: 'get', params
  })
}

// 移除话题词
export function deleteTopicWords (params) {
  return request({
    url: '/api/team/preference/deleteTopicWords',
    method: 'get', params
  })
}

